home *** CD-ROM | disk | FTP | other *** search
- on setAlfaBet
- global AlfaBet
- set AlfaBet to "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ@.-,/\()!? "
- end
-
- on getAlfaBet
- global AlfaBet
- return AlfaBet
- end
-
- on checkkey
- global NotePadClipBoard
- if the commandDown then
- if the keyCode = 9 then
- if NotePadClipBoard <> EMPTY then
- set xx to the selStart
- put string(NotePadClipBoard) after char xx of field "source"
- put string(NotePadClipBoard) after char xx of field "NB"
- set the selEnd to xx + the number of chars in NotePadClipBoard
- set the selStart to xx + the number of chars in NotePadClipBoard
- dontPassEvent()
- end if
- else
- if the keyCode = 8 then
- if the selection <> EMPTY then
- set NotePadClipBoard to the selection
- end if
- end if
- end if
- else
- if the keyCode <> 51 then
- if not (getAlfaBet() contains the key) and (the keyCode <> 36) then
- dontPassEvent()
- end if
- else
- end if
- end if
- end
-